package FourHomeworkDesign.Flyweight;

/**
 * @author 北巷_东坡
 * @date 2022/11/13 19:32
 * @computer 10741
 */
public class Client {
    public static void main(String[] args) {
        WordFactory206 factory206=new WordFactory206();
        Word206 w1,w2,w3;
        w1 = factory206.getWord206("java");
        w2 = factory206.getWord206("java");
        w3 = factory206.getWord206("java");

        w1.setColor(new Color206("red"));
        w1.setFont(new Font206("font1"));

        w2.setColor(new Color206("green"));
        w2.setFont(new Font206("font2"));

        w3.setColor(new Color206("blue"));
        w3.setFont(new Font206("font3"));

        System.out.println(w1);
        System.out.println(w2);
        System.out.println(w3);
    }
}
